package org.jeecg.modules.system.upgrade.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.jeecg.modules.system.upgrade.dto.EditionDto;
import org.jeecg.modules.system.upgrade.dto.VersionDto;
import org.jeecg.modules.system.upgrade.entity.BikeUpgradeAppVersion;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * @Description: APP版本表
 * @Author: 月月鸟
 * @Date:   2021-07-14
 * @Version: V1.0
 */
public interface BikeUpgradeAppVersionMapper extends BaseMapper<BikeUpgradeAppVersion> {

    IPage<VersionDto> getEditionList(Page<EditionDto> editionDto,@Param("appId") String appId,@Param("id") String id,@Param("newest") String newest);

    @Update("update bike_upgrade_app_version set download_count=download_count + 1 where id =#{id}")
    void updateDownloadCount(@Param("id") String id);
}
